import 'package:flutter/material.dart';

class Anli extends StatelessWidget {
  const Anli({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('订单详情'),
      ),
      body: ListView(
        padding: EdgeInsets.all(16.0),
        children: [
          Card(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                ListTile(
                  leading: Image.network(
                    'https://tse1-mm.cn.bing.net/th/id/OIP-C.LLqDB9Ltj5kdeD5_nUC-cwHaHa?w=186&h=186&c=7&r=0&o=5&dpr=1.5&pid=1.7',
                    width: 100,
                  ), // 替换为实际图片链接
                  title: Text('茶水分离杯耐热隔热玻璃杯'),
                  subtitle: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Text('规格: 白色240ml'),
                      const Text('¥119'),
                    ],
                  ),
                  trailing: Text('x 2'),
                ),
                Padding(
                  padding: const EdgeInsets.all(8.0),
                ),
                Divider(),
                Padding(
                  padding: const EdgeInsets.all(8.0),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text('合计: ¥239'),
                      ElevatedButton(
                        onPressed: () {
                          // 添加再次购买的逻辑
                        },
                        child: Text('再次购买'),
                      ),
                    ],
                  ),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
